{extend name="../../base/view/common/base" /}
{block name="style"}
<style>
html{background-color:#fff;}
.layui-table-min th{font-size:13px; text-align:center; background-color:#f8f8f8;}
.layui-table-min td{font-size:13px; padding:6px;text-align:center;}
.layui-table-min tr.question-none td{padding:10px 0; color:#999}
</style>
{/block}
<!-- 主体 -->
{block name="body"}
<div class="p-page">
	<h3 class="pb-2">讲师详情</h3>
	<table class="layui-table layui-table-form">
		<tr>
			<td class="layui-td-gray">讲师姓名</td>
			<td>{$detail.name}</td>
			<td class="layui-td-gray">性别</td>
			<td>
				{eq name="$detail.sex" value="1"}男{/eq}
				{eq name="$detail.sex" value="2"}女{/eq}
			</td>
			<td class="layui-td-gray">状态</td>
			<td>
				{eq name="$detail.status" value="1"}正常{/eq}
				{eq name="$detail.status" value="0"}下架{/eq}
			</td>
			<td class="layui-td-gray" rowspan="4">讲师头像</td>
			<td rowspan="4" style="width: 150px; height:200px; padding-top:0; overflow: hidden;">
				<div class="layui-upload" style="width: 150px;">
					<img src="{$detail.thumb_str}" style="max-width: 100%; width: 150px; height:200px;" onerror="javascript:this.src='/static/home/images/nonepic600x600.jpg';this.onerror=null;" />
				</div>
			</td>
		</tr>
		<tr>
			<td class="layui-td-gray">讲师等级</td>
			<td>
				{volist name=":get_base_data('rank')" id="v"}
				{eq name="$detail.level" value="$v.id"}{$v.title}{/eq}
				{/volist}
			</td>
			<td class="layui-td-gray">讲师学历</td>
			<td>
				{volist name=":get_base_data('rank')" id="v"}
					{eq name="$detail.education" value="$v.id"}{$v.title}{/eq}
				{/volist}
			</td>
			<td class="layui-td-gray">手机号码</td>
			<td>{$detail.mobile}</td>
		</tr>
		<tr>
			<td class="layui-td-gray">课程数</td>
			<td>{$detail.count_course}</td>
			<td class="layui-td-gray">培训数</td>
			<td>{$detail.count_train}</td>
			<td class="layui-td-gray">学员数</td>
			<td>{$detail.count_student}</td>
		</tr>
		<tr>
			<td class="layui-td-gray">讲师简介</td>
			<td colspan="5"><pre style="font-family:inherit">{$detail.desc|default=''}</pre></td>
		</tr>
		<tr>
			<td colspan="8"><strong>课程列表</strong></td>
		</tr>
		<tr>
			<td colspan="8">
				<table class="layui-table layui-table-min" style="margin:0">
					<tr>
						<th width="100">课程编号</th>
						<th width="80">类型</th>
						<th width="100">所属分类</th>
						<th>课程名称</th>
						<th width="60">学分</th>
						<th width="150">课程总时长</th>
						<th width="60">状态</th>
					</tr>
					{empty name="$course"}
					<tr>
						<td colspan="7"><div style="padding:10px; text-align:center; color:#999">暂无数据</div></td>
					</tr>
					{/empty}
					{volist name="$course" id="vo"}
					<tr>
						<td>{$vo.id}</td>
						<td>{$vo.typestr}</td>
						<td>{$vo.cate}</td>
						<td style="text-align:left;">{$vo.title}</td>
						<td>{$vo.credit}</td>
						<td>{$vo.duration}</td>
						<td>{$vo.status==1?'<span class="green">正常</span>':'<span class="yellow">下架</span>'}</td>
					</tr>
					{/volist}
				</table>
			</td>
		</tr>
		<tr>
			<td colspan="8"><strong>培训列表</strong></td>
		</tr>
		<tr>
			<td colspan="8">
				<table class="layui-table layui-table-min" style="margin:0">
					<tr>
						<th width="100">培训编号</th>
						<th width="100">所属分类</th>
						<th>培训名称</th>
						<th width="150">开课时间</th>
						<th width="150">培训时长</th>
						<th width="60">状态</th>
					</tr>
					{empty name="$train"}
					<tr>
						<td colspan="7"><div style="padding:10px; text-align:center; color:#999">暂无数据</div></td>
					</tr>
					{/empty}
					{volist name="$train" id="vo"}
					<tr>
						<td>{$vo.id}</td>
						<td>{$vo.cate}</td>
						<td style="text-align:left;">{$vo.title}</td>
						<td>{$vo.open_time}</td>
						<td>{:getTimeBySec($vo.duration)}</td>
						<td>{$vo.status==1?'<span class="green">正常</span>':'<span class="yellow">下架</span>'}</td>
					</tr>
					{/volist}
				</table>
			</td>
		</tr>
	</table>
</div>
{/block}
<!-- /主体 -->

<!-- 脚本 -->
{block name="script"}
<script>
const moduleInit = ['tool'];
function gouguInit() {

}
</script>
{/block}
<!-- /脚本 -->